Name :Stop the instruction

Symbol :MC_Stop

Illustrate:

    It is used for the shaft to realize the emergency stop function, and the command rising edge is effective.
    This command can only be invoked if the axis is enabled using the MC_Power command.
    On the rising edge of the EXECUTE, the input DECE value is locked, and the PLCOpen state machine of the axis switches to Stopping and does a deceleration and shutdown motion.
    The DONE signal is valid after stopping, and when EXECUTE=TRUE, DONE is maintained, and the axis state is kept at Stopping.
    EXECUTE=OFF, and has stopped, the PLCOpen state machine of the axis is switched from Stopping to Standstill.
    If the same MC_Stop command is re-triggered during the execution of the order, the deceleration at the time of the last trigger is used.
    Instructions cannot be called multiple times, and other MC_Stop instructions are invoked during the validity period of one instruction, and other MC_Stop instructions will report errors.
    This command cannot be interrupted, and the motion command cannot be executed when the PLCOpen state machine of the axis is Stopping (refer to the PLCOpen state machine of the axis). 

Image:

Parameter:

>
The name of the parameter data type IN/OUT Parameter role Illustrate Default value
AXISNO UDINT IN Pulse shaft number 0-7
not
EXECUTE BOOL IN Function block triggering The rising edge triggers the execution of the order
FALSE
DECE REAL IN Deceleration Deceleration(0 - Stop immediately; non-0 - Absolute value valid), ≤ maximum acceleration, in units:unit/s
not
DONE BOOL OUT Shutdown Complete flag TRUE:The shutdown is complete
FALSE
BUSY BOOL OUT Busy sign TRUE:Deceleration is being stopped
FALSE
ERROR BOOL OUT Error flags TRUE:There was an error with the function block call
FALSE
ERRORID UINT OUT Error codes 0:Normal, Other: Error code value
0

Example:

LD:

ST:



Interpretation:

   AXISNO is 0, which means that the operating pulse axis is 0;
   EXECUTE is executed by FALSE->TRUE, and the rising edge triggers the function block to execute;
   DECE is 100, which means deceleration at 100 unit/s until it stops.
   If DoneOut is TRUE, the deceleration and shutdown are complete.
   BusyOut is TRUE, which means that the deceleration is stopping, and BusyOut is reset after completion.
   If ErrorOut is TURE, it means that there is an error and the command cannot be executed.
   If ErrorIdOut is 0, the execution is normal, and if it is not 0, there is an error and cannot be executed.